import request from '/@/utils/request';

/**
 * （不建议写成 request.post(xxx)，因为这样 post 时，无法 params 与 data 同时传参）
 *
 * 登录api接口集合
 * @method signIn 用户登录
 * @method signOut 用户退出登录
 */

// 科室列表
export function departmentList() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/Depart/index',
                method: 'post',
                data,
            });
        },
    };
}

// 房间管理
export function roomList() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/room/index',
                method: 'post',
                data,
            });
        },
    };
}

// 新增房间
export function addRoom() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/room/add',
                method: 'post',
                data,
            });
        },
    };
}

// 住院
export function inHospital() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/room/hospital',
                method: 'post',
                data,
            });
        },
    };
}

// 出院
export function outHospital() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/room/discharge',
                method: 'post',
                data,
            });
        },
    };
}


// 图片上传
export function upload() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/Fileimg/file',
                method: 'post',
                data,
                headers: {
                    'Content-Type': 'multipart/form-data'
                }
            });
        },
    };
}

// 就诊卡列表
export function cardIndex() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/Visit/index',
                method: 'post',
                data,
            });
        },
    };
}

// 就诊卡详情
export function cardList() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/Visit/details',
                method: 'post',
                data,
            });
        },
    };
}

// 查房列表
export function checkIndex() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/check/index',
                method: 'post',
                data,
            });
        },
    };
}

// 查房添加
export function checkAdd() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/check/add',
                method: 'post',
                data,
            });
        },
    };
}

// 结算列表
export function settlementList() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/Settlement/index',
                method: 'post',
                data,
            });
        },
    };
}

// 结算添加
export function settlementAdd() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/Settlement/add',
                method: 'post',
                data,
            });
        },
    };
}

// 结算删除
export function settlementDelete() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/Settlement/del',
                method: 'post',
                data,
            });
        },
    };
}


// 体检套餐列表
export function checkPackage() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/Package/index',
                method: 'post',
                data,
            });
        },
    };
}

// 药品列表
export function medicineList() { 
    return {
        signIn: (data: object) => {
            return request({
                url: 'pc/Drug/index',
                method: 'post',
                data,
            });
        },
    };
}